package cc.rboot.lock.annotation;

import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;


/**
 * @author lms
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Lockable {

    String subject() default "DEFAULT";

    @AliasFor("subject")
    String value() default "DEFAULT";

    //spel表达式，可解析标注方法里的参数
    String key();

    // 是否将配置文件中指定的spring.redis.lock.key-prefix的值作为前缀
    boolean usePrefix() default true;
}